<?php
//--------------------------------------------------
// Patch file:	patch_ucp_advnot.php
// Patch time:	Sun 2 Dec 2007, 18:45 (GMT)
//--------------------------------------------------
if ( !defined('IN_PHPBB') )
{
	die('Hack attempt');
}

// header
$patch_version = '1.0.0';
$patch_date = '20060730';
$patch_author = 'impleri';
$patch_ref = 'User control panel: Notifications';
$patch_sys = true;

// panels and fields
$patch_data = array(
	'ucp' => array(
		'name' => 'User_control_panel',
		'auth' => array(POST_PANELS_URL => 'access'),
		'options' => array(

			'prefs' => array(
				'name' => 'Preferences',
				'auth' => array(POST_GROUPS_URL => 'ucp_edit_profile'),
				'options' => array(

					'posting' => array(
						'name' => 'Posting_messages',
						'auth' => array(POST_GROUPS_URL => 'ucp_edit_posting'),
						'fields' => array(
							'user_attachsig' => array('type' => 'radio_list', 'legend' => 'Always_add_sig', 'options' => '[var]list_no_yes', 'field' => 'user_attachsig'),
							'user_allowbbcode' => array('type' => 'radio_list', 'legend' => 'Always_bbcode', 'options' => '[var]list_no_yes', 'field' => 'user_allowbbcode'),
							'user_allowhtml' => array('type' => 'radio_list', 'legend' => 'Always_html', 'options' => '[var]list_no_yes', 'field' => 'user_allowhtml'),
							'user_allowsmile' => array('type' => 'radio_list', 'legend' => 'Always_smile', 'options' => '[var]list_no_yes', 'field' => 'user_allowsmile'),
						),
					),

					'privacy' => array(
						'name' => 'Privacy_choices',
						'auth' => array(POST_GROUPS_URL => 'ucp_edit_privacy'),
						'fields' => array(
							'user_allow_viewonline' => array('type' => 'radio_list', 'legend' => 'Hide_user', 'options' => '[var]list_reverse_no_yes', 'field' => 'user_allow_viewonline'),
							'user_viewemail' => array('type' => 'radio_list', 'legend' => 'Public_view_email', 'options' => '[var]list_no_yes', 'field' => 'user_viewemail'),
						),
					),

					'notify' => array(
						'name' => 'Notify_prefs',
						'auth' => array(POST_GROUPS_URL => 'ucp_edit_notify'),
						'fields' => array(
							'user_style' => array('type' => 'list', 'legend' => 'Board_style', 'options' => '[func]get_list_styles_dft', 'field' => 'user_style', 'config_over' => 'override_user_style'),
							'user_board_box' => array('type' => 'radio_list', 'legend' => 'Board_box_display', 'options' => '[var]list_dft_yes_deny', 'field' => 'user_board_box', 'config_over' => 'board_box_over'),
							'user_index_pack' => array('type' => 'radio_list', 'legend' => 'Index_pack', 'explain' => 'Index_pack_explain', 'options' => '[var]list_dft_yes_deny', 'field' => 'user_index_pack', 'config_over' => 'index_pack_over'),
							'user_index_split' => array('type' => 'radio_list', 'legend' => 'Index_split', 'explain' => 'Index_split_explain', 'options' => '[var]list_dft_yes_deny', 'field' => 'user_index_split', 'config_over' => 'index_split_over'),
						),
					),
				),
			),
			'messages' => array(
				'name' => 'Message_Center',
				'auth' => array(POST_GROUPS_URL => 'ucp_edit_profile'),
				'options' => array(
					'read' => array(
						'name' => 'Messages_Home',
						'auth' => array(POST_GROUPS_URL => 'ucp_advnot_messcp'),
						'options' => array(
							'readbox' => array(
								'name' => 'Message_box',
								'file' => 'includes/ucp/ucp_advnot_readbox',
								'auth' => array(POST_GROUPS_URL => 'ucp_advnot_messcp'),
							),
							'readpm' => array(
								'name' => 'Read_PM',
								'file' => 'includes/ucp/ucp_advnot_readpm',
								'auth' => array(POST_GROUPS_URL => 'ucp_advnot_messcp'),
								'hidden' => true,
							),
						),
					),
					'manage_boxes' => array(
						'name' => 'Manage_Boxes',
						'file' => 'includes/ucp/ucp_advnot_boxes',
						'auth' => array(POST_GROUPS_URL => 'ucp_advnot_messcp'),
					),
					'manage_rules' => array(
						'name' => 'Manage_Rules',
						'file' => 'includes/ucp/ucp_advnot_rules',
						'auth' => array(POST_GROUPS_URL => 'ucp_advnot_messcp'),
					),
					'compose_pm' => array(
						'name' => 'Compose_PM',
						'file' => 'includes/ucp/ucp_advnot_pm',
						'auth' => array(POST_GROUPS_URL => 'ucp_advnot_messcp'),
						),
					),
					'compose_email' => array(
						'name' => 'Compose_email',
						'file' => 'includes/ucp/ucp_advnot_email',
						'auth' => array(POST_GROUPS_URL => 'ucp_advnot_messcp'),
					),
				),
			),
		),
	),
);


// auths definitions
$patch_auths = array(
	POST_PANELS_URL => array(
		'access' => array(
			GROUP_ANONYMOUS => array('ucp' => true),
			GROUP_REGISTERED => array('ucp' => true),
		),
	),

	POST_GROUPS_URL => array(
		'ucp_edit_notify' => array(
			GROUP_ADMIN => array(GROUP_ANONYMOUS => true, GROUP_FOUNDER => DENY, GROUP_ADMIN => DENY, GROUP_REGISTERED => true),
			GROUP_REGISTERED => array(GROUP_OWN => true),
		),
	),
);


?>